﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 函数重载
{
    class Program
    {
        static void Main(string[] args)
        {
            double area = TriangleArea(3.0, 4.0, 5.0);
        }
        static double TriangleArea(double a, double b,double c)
        {
            Console.WriteLine("3");
            double s = (a + b + c) / 2;
            return Math.Sqrt(s * (s - a) * (s - b) * (s - c));
        }
        static double TriangleArea(double a,double h)
        {
            Console.WriteLine("2");
            return (a * h) / 2;
        }
        static double TriangleArea(int a, int b,double theta)
        {
            Console.WriteLine("1");
            return (a * b * Math.Sin(theta)) / 2;
        }
    }
}
